package com.heyige.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.heyige.entity.MemberOrder;

import java.util.Optional;

public interface MemberOrderService extends IService<MemberOrder> {
    
    /**
     * 根据ID和用户ID查找会员订单
     */
    Optional<MemberOrder> findByIdAndUserId(Long id, Long userId);
    
    /**
     * 根据用户ID查找会员订单，按创建时间降序
     */
    Page<MemberOrder> findByUserIdOrderByCreatedAtDesc(Long userId, Page<MemberOrder> page);
}